#ifndef UUID_DADE0A9E05154CCAF64B25B82AACC61E
#define UUID_DADE0A9E05154CCAF64B25B82AACC61E

#include <stddef.h>
#include "event.h"
#include "../gvl/support/cstdint.hpp"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct flip_window_
{
	flip_window_handlers handlers;
	struct flip_window_internal_* internal_;
} flip_window;

typedef unsigned int uint;

typedef struct flip_point_
{
	int x, y;
} flip_point;

flip_window* flip_create_window();
void flip_destroy_window(flip_window* w);

int  flip_window_is_visible(flip_window* w);
int  flip_window_set_visible(flip_window* w, int visible);
void flip_window_set_captionl(flip_window* w, char const* str, size_t len);
void flip_window_set_caption(flip_window* w, char const* str);

int  flip_window_set_mode(flip_window* w, uint width, uint height, int fullscreen);
int  flip_window_update(flip_window* w);
int  flip_window_draw(flip_window* w);
int  flip_window_redraw(flip_window* w);
void flip_window_end_drawing(flip_window* w);
void flip_window_clear(flip_window* w);
int  flip_window_extension_supported(flip_window* w, char const* name);
int  flip_window_close(flip_window* w);
uint flip_window_width(flip_window* w);
uint flip_window_height(flip_window* w);
void flip_window_throttle_fps(flip_window* self, int fps);

void flip_window_force_button(flip_window* w, int id, int down, int collect_event);
void flip_window_set_button(flip_window* w, int id, int down, int collect_event);

int flip_window_button_pressed(flip_window* w, int id);

flip_point flip_window_mouse_pos(flip_window* w);

void flip_window_default_handlers(flip_window* w);

#ifdef __cplusplus
} // extern "C"
#endif

#endif // UUID_DADE0A9E05154CCAF64B25B82AACC61E
